<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<%@taglib prefix="s" uri="/struts-tags"  %>
<%@ page import="com.starbaba.core.web.constant.WebConstants"%>
<%@ page import="com.starbaba.system.user.model.UserVO"%>
<!DOCTYPE html>
<html lang="en">
<head>
<%@ include file="/common/common-css.jsp"%>
<style>
.table>th {
	vertical-align: center;
	background-color: grey;
}
</style>
</head>
<body class="no-skin">
	<div class="page-content">
		<div class="page-content-area">
			<div class="row">
				<div class="col-xs-12 col-sm-12 widget-container-col">
					<div class="widget-box widget-color-blue" style="height: 1000px;">
						<div class="widget-header widget-header-small">
							<h6 class="widget-title lighter">
								<i class="ace-icon glyphicon glyphicon-th-list"></i>错误详情信息
							</h6>
							<div class="widget-toolbar no-border">
								<a href="#" data-action="collapse"> <i
									class="ace-icon fa fa-chevron-up"></i>
								</a>
							</div>
						</div>

						<div class="widget-body">
							<div class="widget-main">
								<form class="form-horizontal" id="product-form"
									name="product-form" method="post" enctype="multipart/form-data">
									<div>
										<div>
											<label for="from">projectname</label> 
											<input type="text" id="projectname" class="col-xs-12 col-sm-12" value="${paramsMap.model.projectname}"/>
										</div>
										<br>
										<div>
											<label for="from">exception</label>
											<input type="text" id="exception" class="col-xs-12 col-sm-12" value="${paramsMap.model.exception}"/>
										</div>
										<br>
										<div>
											<label for="from">firststack</label>
											<input type="text" id="firststack" class="col-xs-12 col-sm-12" value="${paramsMap.model.firststack}"/>
										</div>
										<br>
										<div>
											<label for="from">stacktrace</label>
											<textarea id="stacktrace" class="col-xs-12 col-sm-12" style="height:300px; word-break:break-all">
												${paramsMap.model.stacktrace}
											</textarea>
										</div>
										<br>
										
										<div>
											<label for="from">msg</label>
											<textarea id="msg" class="col-xs-12 col-sm-12" style="height:300px; word-break:break-all">
												${paramsMap.model.msg}
											</textarea>
										</div>
									</div>
								</form>
							</div>
						</div>
					</div>
					<br><br>
					<div align="center">
						<div style="width:320px">
							<label class="col-sm-4 control-label" style="text-align: left;" for="email">收件人：</label>
							<div class="col-sm-8" style="padding-left: 0;" >
								<select class="form-control" id="receiver_address">
									<option value="linhang@xmiles.cn">林航</option>
									<option value="chenweijun@xmiles.cn">陈伟均</option>
									<option value="weibifeng@xmiles.cn">魏壁烽</option>
									<option value="chenjiayu@xmiles.cn">陈家煜</option>
									<option value="zhengjunjie@xmiles.cn">郑俊杰</option>
									<option value="dongleilei@xmiles.cn">董雷雷</option>
									<option value="liangzongxi@tuanzidai.cn">梁宗熙</option>
								</select>
							</div>
						</div>
					</div>
					<br><br><br>
					<div align="center">
						<button class="btn btn-purple no-border" type="button" name="btn-send" id="btn_sendEmail">
                        	<i class="ace-icon fa fa-undo icon-on-right bigger-110"></i>
                        	发送
                    	</button>
					</div>
				</div>
			</div>
		</div>
	</div>

	<%@ include file="/common/common-js.jsp"%>
	<%@ include file="/discovery/maxlength.jsp"%>
	<script type="text/javascript" src="${ctx}/ace/js/maxlength.js"></script>
	<script type="text/javascript" src="${ctx}/js/wangEditor-1.3.11.min.js"></script>
	<script type="text/javascript" src="${ctx}/js/jquery.form.js"></script>
	<script type="text/javascript" src="${ctx}/js/call_func.js"></script>
	<script type="text/javascript">
	  
	   $('#btn_sendEmail').click(function () {
	       var projectname = $('#projectname').val();
	       var stacktrace = $('#stacktrace').val();
	       var msg =  $('#msg').val();
	       var receiver_address =  $('#receiver_address').val();
	       var data = {"projectname":projectname, "stacktrace":stacktrace, "msg":msg, "receiver_address":receiver_address};
			$.ajax({
				type:"post",	
				async:true,
				data:data,
				url: ctx + "/logStatistics/sendEmail.action?rand=" + Math.random(),
				success:function(resp){
					alert("发送成功");
				},
				error:function(error){
					alert("发送失败");
				}
			});
	    });
	  
	</script>
</body>
</html>
